/*******************************************************************************
* 
* A simple Logger_ class
* 
* 
******************************************************************************/
#pragma once
#include "noria.h"
#include <map>

using std::map;

namespace noria{ namespace diagnostic
{
    enum LogLevel
    {
        DEBUG_,
        INFO,
        WARN,
        ERROR_, // 'ERROR' will conflict with 'windows.h'.
        FATAL,
    };

    class Logger_  // 'Logger' will conflict with a lot of headers...
    {
    private:
        Logger_(void);
    public:
        ~Logger_(void);
        static Logger_* instance();

    private:
        static unique_ptr<Logger_> s_instance;
        ofstream m_fs;
        map<LogLevel, string> m_map;

    public:
        void write(LogLevel level, const char* source, int line, const char* msg, ...);
        void write(LogLevel level, const char* source, int line, const wchar_t* msg, ...);

    };

}}